import socket


def start_server():

    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

    sock.bind(('127.0.0.1', 9527))

    while True:
        data, addr = sock.recvfrom(1024)

        print('receive>> {0} from {1}'.format(data, addr))

        sock.sendto(('hello , {0}'.format(data)).encode('UTF-8'), addr)


if __name__ == '__main__':
    start_server()